<!DOCTYPE HTML>
<html lang="zh-CN">


<head>
    <meta charset="utf-8">
    <meta name="keywords" content="汇编语言,寻址方式">
    <meta name="description" content="C# | Web | html | python |">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <meta name="renderer" content="webkit|ie-stand|ie-comp">
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
	<meta name="baidu-site-verification" content="code-c9IEbSDR1U" />

	
    <!-- Global site tag (gtag.js) - Google Analytics -->


    <title>汇编语言寻址方式 | X-Y-Z`s Blog</title>
	
    <link rel="icon" type="image/png" href="/favicon.png">

    <link rel="stylesheet" type="text/css" href="/libs/awesome/css/all.css">
    <link rel="stylesheet" type="text/css" href="/libs/materialize/materialize.min.css">
    <link rel="stylesheet" type="text/css" href="/libs/aos/aos.css">
    <link rel="stylesheet" type="text/css" href="/libs/animate/animate.min.css">
    <link rel="stylesheet" type="text/css" href="/libs/lightGallery/css/lightgallery.min.css">
    <link rel="stylesheet" type="text/css" href="/css/matery.css">
    <link rel="stylesheet" type="text/css" href="/css/my.css">

    <script src="/libs/jquery/jquery.min.js"></script>
    <script src="https://sdk.jinrishici.com/v2/browser/jinrishici.js" charset="utf-8"></script>
<meta name="generator" content="Hexo 5.4.0">
<style>.github-emoji { position: relative; display: inline-block; width: 1.2em; min-height: 1.2em; overflow: hidden; vertical-align: top; color: transparent; }  .github-emoji > span { position: relative; z-index: 10; }  .github-emoji img, .github-emoji .fancybox { margin: 0 !important; padding: 0 !important; border: none !important; outline: none !important; text-decoration: none !important; user-select: none !important; cursor: auto !important; }  .github-emoji img { height: 1.2em !important; width: 1.2em !important; position: absolute !important; left: 50% !important; top: 50% !important; transform: translate(-50%, -50%) !important; user-select: none !important; cursor: auto !important; } .github-emoji-fallback { color: inherit; } .github-emoji-fallback img { opacity: 0 !important; }</style>
<link rel="stylesheet" href="/css/prism-tomorrow.css" type="text/css"></head>



   <style>
    body{
       background-image: url(/medias/background.JPG);
       background-repeat:no-repeat;
       background-size:cover;
       background-attachment:fixed;
    }
</style>



<body  onload="opener.location.reload()">

	
    <header class="navbar-fixed">

<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?b3593488200a34a873defcaa11fc888a";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>


    <nav id="headNav" class="bg-color nav-transparent">
        <div id="navContainer" class="nav-wrapper container">
            <div class="brand-logo">
                <a href="/" class="waves-effect waves-light">
                    
                    <img src="/medias/logo.png" class="logo-img" alt="LOGO">
                    
                    <span class="logo-span">X-Y-Z`s Blog</span>
                </a>
            </div>
            

<a href="#" data-target="mobile-nav" class="sidenav-trigger button-collapse"><i class="fas fa-bars"></i></a>
<ul class="right nav-menu">
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/" class="waves-effect waves-light">
      
      <i class="fas fa-home" style="zoom: 0.6;"></i>
      
      <span>首页</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/tags" class="waves-effect waves-light">
      
      <i class="fas fa-tags" style="zoom: 0.6;"></i>
      
      <span>标签</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="" class="waves-effect waves-light">

      
      <i class="fas fa-sitemap" style="zoom: 0.6;"></i>
      
      <span>归类</span>
      <i class="fas fa-chevron-down" aria-hidden="true" style="zoom: 0.6;"></i>
    </a>
    <ul class="sub-nav menus_item_child ">
      
      <li>
        <a href="/categories">
          
          <i class="fas fa-bookmark" style="margin-top: -20px; zoom: 0.6;"></i>
          
          <span>分类</span>
        </a>
      </li>
      
      <li>
        <a href="/archives">
          
          <i class="fas fa-archive" style="margin-top: -20px; zoom: 0.6;"></i>
          
          <span>归档</span>
        </a>
      </li>
      
    </ul>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/navigate" class="waves-effect waves-light">
      
      <i class="fas fa-location-arrow" style="zoom: 0.6;"></i>
      
      <span>导航</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/about" class="waves-effect waves-light">
      
      <i class="fas fa-user-circle" style="zoom: 0.6;"></i>
      
      <span>关于</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/contact" class="waves-effect waves-light">
      
      <i class="fas fa-comments" style="zoom: 0.6;"></i>
      
      <span>留言</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/friends" class="waves-effect waves-light">
      
      <i class="fas fa-address-book" style="zoom: 0.6;"></i>
      
      <span>友链</span>
    </a>
    
  </li>
  
  <li>
    <a href="#searchModal" class="modal-trigger waves-effect waves-light">
      <i id="searchIcon" class="fas fa-search" title="搜索" style="zoom: 0.85;"></i>
    </a>
  </li>
</ul>


<div id="mobile-nav" class="side-nav sidenav">

    <div class="mobile-head bg-color">
        
        <img src="/medias/logo.png" class="logo-img circle responsive-img">
        
        <div class="logo-name">X-Y-Z`s Blog</div>
        <div class="logo-desc">
            
            C# | Web | html | python |
            
        </div>
    </div>

    

    <ul class="menu-list mobile-menu-list">
        
        <li class="m-nav-item">
	  
		<a href="/" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-home"></i>
			
			首页
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/tags" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-tags"></i>
			
			标签
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="javascript:;">
			
				<i class="fa-fw fas fa-sitemap"></i>
			
			归类
			<span class="m-icon"><i class="fas fa-chevron-right"></i></span>
		</a>
            <ul  style="background:  ;" >
              
                <li>

                  <a href="/categories " style="margin-left:50px">
				  
				   <i class="fa fas fa-bookmark" style="position: absolute;left:28px" ></i>
			      
		          <span>分类</span>
                  </a>
                </li>
              
                <li>

                  <a href="/archives " style="margin-left:50px">
				  
				   <i class="fa fas fa-archive" style="position: absolute;left:28px" ></i>
			      
		          <span>归档</span>
                  </a>
                </li>
              
            </ul>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/navigate" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-location-arrow"></i>
			
			Navigate
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/about" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-user-circle"></i>
			
			关于
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/contact" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-comments"></i>
			
			留言板
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/friends" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-address-book"></i>
			
			友情链接
		</a>
          
        </li>
        
        
        <li><div class="divider"></div></li>
        <li>
            <a href="https://github.com/blinkfox/hexo-theme-matery" class="waves-effect waves-light" target="_blank">
                <i class="fab fa-github-square fa-fw"></i>Fork He
            </a>
        </li>
        
    </ul>
</div>


        </div>

        
            <style>
    .nav-transparent .github-corner {
        display: none !important;
    }

    .github-corner {
        position: absolute;
        z-index: 10;
        top: 0;
        right: 0;
        border: 0;
        transform: scale(1.1);
    }

    .github-corner svg {
        color: #4e9ef5;
        fill: #fff;
        height: 64px;
        width: 64px;
    }

    .github-corner:hover .octo-arm {
        animation: a 0.56s ease-in-out;
    }

    .github-corner .octo-arm {
        animation: none;
    }

    @keyframes a {
        0%,
        to {
            transform: rotate(0);
        }
        20%,
        60% {
            transform: rotate(-25deg);
        }
        40%,
        80% {
            transform: rotate(10deg);
        }
    }
</style>

<a href="https://github.com/blinkfox/hexo-theme-matery" class="github-corner tooltipped hide-on-med-and-down" target="_blank"
   data-tooltip="Fork He" data-position="left" data-delay="50">
    <svg viewBox="0 0 250 250" aria-hidden="true">
        <path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
        <path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
              fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path>
        <path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z"
              fill="currentColor" class="octo-body"></path>
    </svg>
</a>
        
    </nav>

</header>

    



<div class="bg-cover pd-header post-cover" style="background-image: url('/medias/featureimages/5.jpg')">
    <div class="container" style="right: 0px;left: 0px;">
        <div class="row">
            <div class="col s12 m12 l12">
                <div class="brand">
                    <h1 class="description center-align post-title">汇编语言寻址方式</h1>
                </div>
            </div>
        </div>
    </div>
</div>




<main class="post-container content">

    
    <link rel="stylesheet" href="/libs/tocbot/tocbot.css">
<style>
    #articleContent h1::before,
    #articleContent h2::before,
    #articleContent h3::before,
    #articleContent h4::before,
    #articleContent h5::before,
    #articleContent h6::before {
        display: block;
        content: " ";
        height: 100px;
        margin-top: -100px;
        visibility: hidden;
    }

    #articleContent :focus {
        outline: none;
    }

    .toc-fixed {
        position: fixed;
        top: 64px;
    }

    .toc-widget {
        width: 345px;
        padding-left: 20px;
    }

	.toc-widget.card.toc-fixed {
    opacity: 0.85;
	}
    .toc-widget .toc-title {
        padding: 35px 0 15px 17px;
        font-size: 1.5rem;
        font-weight: bold;
        line-height: 1.5rem;
    }

    .toc-widget ol {
        padding: 0;
        list-style: none;
    }

    #toc-content {
        padding-bottom: 30px;
		height: 500px;
		overflow: auto;
    }

    #toc-content ol {
        padding-left: 10px;
    }

    #toc-content ol li {
        padding-left: 10px;
    }

    #toc-content .toc-link:hover {
        color: #42b983;
        font-weight: 700;
        text-decoration: underline;
    }
    #toc-content .toc-link::before {
        background-color: transparent;
        max-height: 25px;

        position: absolute;
        right: 23.5vw;
        display: block;
    }

    #toc-content .is-active-link {
        color: #42b983;
    }

    #floating-toc-btn {
        position: fixed;
        right: 15px;
        bottom: 76px;
        padding-top: 15px;
        margin-bottom: 0;
        z-index: 998;
    }

    #floating-toc-btn .btn-floating {
        width: 48px;
        height: 48px;
    }

    #floating-toc-btn .btn-floating i {
        line-height: 48px;
        font-size: 1.4rem;
    }
</style>
<div class="row">
    <div id="main-content" class="col s12 m12 l9">
        <!-- 文章内容详情 -->
<div id="artDetail">
    <div class="card">
        <div class="card-content article-info">
            <div class="row tag-cate">
                <div class="col s7">
                    
                    <div class="article-tag">
                        
                            <a href="/tags/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BB%84%E6%88%90%E5%8E%9F%E7%90%86/">
                                <span class="chip bg-color">计算机组成原理</span>
                            </a>
                        
                            <a href="/tags/%E6%B1%87%E7%BC%96%E8%AF%AD%E8%A8%80/">
                                <span class="chip bg-color">汇编语言</span>
                            </a>
                        
                    </div>
                    
                </div>
                <div class="col s5 right-align">
                    
                    <div class="post-cate">
                        <i class="fas fa-bookmark fa-fw icon-category"></i>
                        
                            <a href="/categories/%E6%B1%87%E7%BC%96%E8%AF%AD%E8%A8%80/" class="post-category">
                                汇编语言
                            </a>
                        
                            <a href="/categories/%E6%B1%87%E7%BC%96%E8%AF%AD%E8%A8%80/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BB%84%E6%88%90%E5%8E%9F%E7%90%86/" class="post-category">
                                计算机组成原理
                            </a>
                        
                    </div>
                    
                </div>
            </div>

            <div class="post-info">
                
                <div class="post-date info-break-policy">
                    <i class="far fa-calendar-minus fa-fw"></i>发布日期:&nbsp;&nbsp;
                    2021-10-22
                </div>
                

                
                <div class="post-date info-break-policy">
                    <i class="far fa-calendar-check fa-fw"></i>更新日期:&nbsp;&nbsp;
                    2022-02-23
                </div>
                

                
                <div class="info-break-policy">
                    <i class="far fa-file-word fa-fw"></i>文章字数:&nbsp;&nbsp;
                    2k
                </div>
                

                
                <div class="info-break-policy">
                    <i class="far fa-clock fa-fw"></i>阅读时长:&nbsp;&nbsp;
                    7 分
                </div>
                

                
            </div>
        </div>
        <hr class="clearfix">

        

        
        <!-- 代码块折行 -->
        <style type="text/css">
            code[class*="language-"], pre[class*="language-"] { white-space: pre-wrap !important; }
        </style>
        

        <div class="card-content article-card-content">
            <div id="articleContent">
                <p>指令寻址方式可分为两种大类。一顺序寻址，二跳跃寻址。</p>
<p>可从字面意义读出，顺序寻址即依次寻址，当代码执行时，所执行代码的变换即为这种（没有函数调用与跳转的情况）。跳跃寻址很容易理解，即按所需要的情况，直接到指定地址队数据进行读取与修改。这种情况也最为常见。</p>
<blockquote>
<p>一般来说顺序寻址多为计算机本身的运行，而跳跃寻址为人为的为了达到某个目的而使用。</p>
</blockquote>
<p>以下对跳跃寻址进行分类，总结。</p>
<p>跳跃寻址又可分为数据寻址与转移地址寻址两大类。</p>
<div text-align:left;margin:0="" 0;=""><svg xmlns:ev="http://www.w3.org/2001/xml-events" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="917" height="539" viewBox="0 0 917 539"><defs></defs><g id="page1" transform="translate(5.5,5.5)"><rect width="907" fill="#ffffff" x="0" height="529" y="0"></rect><g id="group1"><path d="M.0,.0L907.1,.0L907.1,529.1L.0,529.1L.0,.0z" id="shape2" fill="#fbf9f7" fill-rule="nonzero"></path><path d="M.0,.0L.0,49.2L153.0,117.3L68.0,.0L.0,.0z" id="shape3" fill="#e0d9bd" fill-opacity="0.21" fill-rule="nonzero" transform="translate(1.77,0.00)"></path><path d="M.0,.0L284.9,46.4L57.1,80.2L.0,.0z" id="shape4" fill="#c7c7af" fill-opacity="0.21" fill-rule="nonzero" transform="translate(97.72,37.11)"></path><path d="M.0,.0L304.8,.0L170.0,60.2L27.9,37.1L.0,.0z" id="shape5" fill="#d6c5a0" fill-opacity="0.21" fill-rule="nonzero" transform="translate(69.78,-0.00)"></path><path d="M.0,60.2L281.8,106.3L312.1,.0L134.8,.0L.0,60.2z" id="shape6" fill="#e0d9bd" fill-opacity="0.21" fill-rule="nonzero" transform="translate(239.81,0.00)"></path><path d="M.0,106.3L64.4,117.3L30.4,.0L.0,106.3z" id="shape7" fill="#d6c5a0" fill-opacity="0.21" fill-rule="nonzero" transform="translate(521.58,0.00)"></path><path d="M19.4,64.5L354.6,1.3L.0,.0L19.4,64.5z" id="shape8" fill="#d3c29b" fill-opacity="0.21" fill-rule="nonzero" transform="translate(551.94,0.67)"></path><path d="M136.8,.0L235.6,54.5L14.6,77.6L.0,25.4L136.8,.0z" id="shape9" fill="#c7c7af" fill-opacity="0.21" fill-rule="nonzero" transform="translate(571.37,39.76)"></path><path d="M.0,36.1L202.8,.0L202.8,142.4L100.8,92.3L.0,36.1z" id="shape10" fill="#f0e9db" fill-opacity="0.52" fill-rule="nonzero" transform="translate(703.75,2.01)"></path><path d="M.0,.0L94.8,151.4L99.6,153.2L99.6,50.1L.0,.0z" id="shape11" fill="#d6c5a0" fill-opacity="0.21" fill-rule="nonzero" transform="translate(806.99,94.27)"></path><path d="M20.2,.0L25.0,1.8L25.0,144.3L.0,158.1L20.2,.0z" id="shape12" fill="#f0e9db" fill-opacity="0.18" fill-rule="nonzero" transform="translate(881.53,246.33)"></path><path d="M9.0,13.8L34.0,.0L34.0,138.5L.0,76.3L9.0,13.8z" id="shape13" fill="#d6c5a0" fill-opacity="0.14" fill-rule="nonzero" transform="translate(872.57,390.61)"></path><path d="M147.4,53.2L64.8,.0L.0,44.5L147.4,53.2z" id="shape14" fill="#c7c7af" fill-opacity="0.14" fill-rule="nonzero" transform="translate(725.16,413.81)"></path><path d="M115.8,.0L149.8,62.2L.0,62.0L115.8,.0z" id="shape15" fill="#c7c7af" fill-opacity="0.14" fill-rule="nonzero" transform="translate(756.74,466.96)"></path><path d="M115.8,5.5L20.5,.0L.0,67.7L115.8,5.5z" id="shape16" fill="#d6c5a0" fill-opacity="0.14" fill-rule="nonzero" transform="translate(756.28,461.44)"></path><path d="M120.7,.0L172.3,3.1L151.8,70.8L.0,70.8L78.6,26.3L120.7,.0z" id="shape17" fill="#f0e9db" fill-opacity="0.14" fill-rule="nonzero" transform="translate(604.47,458.31)"></path><path d="M165.9,47.5L.0,.0L91.8,90.6L165.9,47.5z" id="shape18" fill="#c7c7af" fill-opacity="0.14" fill-rule="nonzero" transform="translate(517.18,438.50)"></path><path d="M246.4,73.9L57.4,73.9L.0,.0L200.8,28.4L246.4,73.9z" id="shape19" fill="#d3c29b" fill-opacity="0.14" fill-rule="nonzero" transform="translate(362.63,455.26)"></path><path d="M215.7,96.9L170.5,50.9L.0,.0L15.9,68.9L215.7,96.9z" id="shape20" fill="#e0d9bd" fill-opacity="0.14" fill-rule="nonzero" transform="translate(346.69,386.73)"></path><path d="M1.8,162.3L.0,.0L150.5,238.8L1.8,162.3z" id="shape21" fill="#d3c29b" fill-opacity="0.14" fill-rule="nonzero" transform="translate(-0.00,271.57)"></path><path d="M.0,.0L.0,95.3L238.3,95.3L148.8,76.5L.0,.0z" id="shape22" fill="#ebe3d1" fill-opacity="0.14" fill-rule="nonzero" transform="translate(1.77,433.86)"></path><path d="M60.5,106.6L105.3,.0L.0,8.2L60.5,106.6z" id="shape23" fill="#c7c7af" fill-opacity="0.14" fill-rule="nonzero" transform="translate(88.56,403.78)"></path><path d="M.0,107.8L92.6,126.6L153.3,73.3L46.3,.0L.0,107.8z" id="shape24" fill="#f0e9db" fill-opacity="0.14" fill-rule="nonzero" transform="translate(149.03,402.52)"></path><path d="M105.5,89.1L149.8,.0L.0,15.8L105.5,89.1z" id="shape25" fill="#d3c29b" fill-opacity="0.14" fill-rule="nonzero" transform="translate(196.85,386.73)"></path><path d="M.0,89.1L60.0,67.8L44.3,.0L.0,89.1z" id="shape26" fill="#c7c7af" fill-opacity="0.14" fill-rule="nonzero" transform="translate(302.36,386.73)"></path><path d="M60.7,21.3L.0,74.6L178.4,74.6L120.7,.0L60.7,21.3z" id="shape27" fill="#e0d3b7" fill-opacity="0.14" fill-rule="nonzero" transform="translate(241.64,454.55)"></path><g id="group28" transform="matrix(-1.00,0.00,0.00,-1.00,35.8,283.4)"><path d="M20.2,.0L25.0,1.8L25.0,144.3L.0,158.1L20.2,.0z" id="shape29" fill="#f0e9db" fill-opacity="0.18" fill-rule="nonzero" transform="translate(8.96,0.00)"></path><path d="M9.0,13.8L34.0,.0L34.0,138.5L.0,76.3L9.0,13.8z" id="shape30" fill="#d6c5a0" fill-opacity="0.14" fill-rule="nonzero" transform="translate(0.00,144.29)"></path></g></g><path d="M-13.4,18.6C8.4,-11.7,24.5,-51.8,66.8,-51.8" stroke-width="2" stroke-linecap="round" id="shape31" fill="none" stroke="#303030" transform="translate(175.92,212.27)"></path><path d="M-12.5,-18.2L-0.3,-18.2C1.4,-18.2,2.7,-16.9,2.7,-15.2L2.7,9.2C2.7,10.9,2.5,13.4,3.4,15.1C4.5,17.0,6.4,18.2,8.7,18.2L12.5,18.2" stroke-linecap="round" id="shape32" fill="none" stroke="#303030" transform="translate(501.11,215.25)"></path><path d="M-12.5,.0L-0.3,.0C1.4,.0,3.7,.0,5.7,.0C6.6,.0,7.6,.0,8.7,.0L12.5,.0" stroke-linecap="round" id="shape33" fill="none" stroke="#303030" transform="translate(675.96,233.50)"></path><path d="M-20.2,-36.7C3.3,4.6,13.9,70.0,66.8,70.0" stroke-width="2" stroke-linecap="round" id="shape34" fill="none" stroke="#303030" transform="translate(175.92,334.00)"></path><path d="M-12.5,54.8L-0.3,54.8C1.4,54.8,2.7,53.4,2.7,51.8L2.7,-45.8C2.7,-47.4,2.5,-49.9,3.4,-51.6C4.5,-53.5,6.4,-54.8,8.7,-54.8L12.5,-54.8" stroke-linecap="round" id="shape35" fill="none" stroke="#303030" transform="translate(380.65,105.75)"></path><path d="M-12.5,36.5L-0.3,36.5C1.4,36.5,2.7,35.2,2.7,33.5L2.7,-27.5C2.7,-29.2,2.5,-31.6,3.4,-33.4C4.5,-35.2,6.4,-36.5,8.7,-36.5L12.5,-36.5" stroke-linecap="round" id="shape36" fill="none" stroke="#303030" transform="translate(380.65,124.00)"></path><path d="M-12.5,-18.3L-0.3,-18.3C1.4,-18.3,2.7,-16.9,2.7,-15.3L2.7,9.3C2.7,10.9,2.5,13.4,3.4,15.1C4.5,17.0,6.4,18.3,8.7,18.3L12.5,18.3" stroke-linecap="round" id="shape37" fill="none" stroke="#303030" transform="translate(380.65,178.75)"></path><path d="M-12.5,36.5L-0.3,36.5C1.4,36.5,2.7,35.2,2.7,33.5L2.7,-27.5C2.7,-29.2,2.5,-31.6,3.4,-33.4C4.5,-35.2,6.4,-36.5,8.7,-36.5L12.5,-36.5" stroke-linecap="round" id="shape38" fill="none" stroke="#303030" transform="translate(501.11,160.50)"></path><path d="M-12.5,18.3L-0.3,18.3C1.4,18.3,2.7,16.9,2.7,15.3L2.7,-9.3C2.7,-10.9,2.5,-13.4,3.4,-15.1C4.5,-17.0,6.4,-18.3,8.7,-18.3L12.5,-18.3" stroke-linecap="round" id="shape39" fill="none" stroke="#303030" transform="translate(501.11,178.75)"></path><path d="M-12.5,.0L2.7,.0L2.7,.0C2.7,.0,5.4,-0.0,8.7,-0.0L12.5,-0.0" stroke-linecap="round" id="shape40" fill="none" stroke="#303030" transform="translate(501.11,197.00)"></path><path d="M-12.5,-36.5L-0.3,-36.5C1.4,-36.5,2.7,-35.2,2.7,-33.5L2.7,27.5C2.7,29.2,2.5,31.6,3.4,33.4C4.5,35.2,6.4,36.5,8.7,36.5L12.5,36.5" stroke-linecap="round" id="shape41" fill="none" stroke="#303030" transform="translate(501.11,233.50)"></path><path d="M-12.5,.0L-0.3,.0C1.4,.0,3.7,.0,5.7,.0C6.6,.0,7.6,.0,8.7,.0L12.5,.0" stroke-linecap="round" id="shape42" fill="none" stroke="#303030" transform="translate(555.51,51.00)"></path><path d="M-12.5,.0L-0.3,.0C1.4,.0,3.7,.0,5.7,.0C6.6,.0,7.6,.0,8.7,.0L12.5,.0" stroke-linecap="round" id="shape43" fill="none" stroke="#303030" transform="translate(528.31,87.50)"></path><path d="M-12.5,.0L-0.3,.0C1.4,.0,3.7,.0,5.7,.0C6.6,.0,7.6,.0,8.7,.0L12.5,.0" stroke-linecap="round" id="shape44" fill="none" stroke="#303030" transform="translate(635.16,124.00)"></path><path d="M-12.5,.0L-0.3,.0C1.4,.0,3.7,.0,5.7,.0C6.6,.0,7.6,.0,8.7,.0L12.5,.0" stroke-linecap="round" id="shape45" fill="none" stroke="#303030" transform="translate(675.96,160.50)"></path><path d="M-12.5,.0L-0.3,.0C1.4,.0,3.7,.0,5.7,.0C6.6,.0,7.6,.0,8.7,.0L12.5,.0" stroke-linecap="round" id="shape46" fill="none" stroke="#303030" transform="translate(662.36,197.00)"></path><path d="M-12.5,.0L-0.3,.0C1.4,.0,3.7,.0,5.7,.0C6.6,.0,7.6,.0,8.7,.0L12.5,.0" stroke-linecap="round" id="shape47" fill="none" stroke="#303030" transform="translate(689.56,270.00)"></path><path d="M-12.5,27.4L-0.3,27.4C1.4,27.4,2.7,26.0,2.7,24.4L2.7,-18.4C2.7,-20.0,2.5,-22.5,3.4,-24.3C4.5,-26.1,6.4,-27.4,8.7,-27.4L12.5,-27.4" stroke-linecap="round" id="shape48" fill="none" stroke="#303030" transform="translate(417.45,376.57)"></path><path d="M-12.5,-0.1L-0.3,-0.1C1.4,-0.1,3.7,.0,5.7,.1C6.6,.1,7.6,.1,8.7,.1L12.5,.1" stroke-linecap="round" id="shape49" fill="none" stroke="#303030" transform="translate(417.45,404.02)"></path><path d="M-12.5,-18.3L-0.3,-18.3C1.4,-18.3,2.7,-17.0,2.7,-15.3L2.7,9.3C2.7,11.0,2.5,13.4,3.4,15.2C4.5,17.1,6.4,18.3,8.7,18.3L12.5,18.3" stroke-linecap="round" id="shape50" fill="none" stroke="#303030" transform="translate(417.45,422.27)"></path><path d="M-12.5,-36.6L-0.3,-36.6C1.4,-36.6,2.7,-35.2,2.7,-33.6L2.7,27.6C2.7,29.2,2.5,31.7,3.4,33.5C4.5,35.3,6.4,36.6,8.7,36.6L12.5,36.6" stroke-linecap="round" id="shape51" fill="none" stroke="#303030" transform="translate(417.45,440.52)"></path><path d="M-12.5,.0L2.7,.0L2.7,.0C2.7,-0.0,5.4,-0.0,8.7,-0.0L12.5,-0.0" stroke-linecap="round" id="shape52" fill="none" stroke="#303030" transform="translate(578.71,349.20)"></path><path d="M-12.5,.0L-0.3,.0C1.4,.0,3.7,.0,5.7,.0C6.6,.0,7.6,.0,8.7,.0L12.5,.0" stroke-linecap="round" id="shape53" fill="none" stroke="#303030" transform="translate(578.71,404.10)"></path><path d="M-12.5,.0L-0.3,.0C1.4,.0,3.7,.0,5.7,.0C6.6,.0,7.6,.0,8.7,.0L12.5,.0" stroke-linecap="round" id="shape54" fill="none" stroke="#303030" transform="translate(578.71,440.60)"></path><path d="M-12.5,.0L-0.3,.0C1.4,.0,3.7,.0,5.7,.0C6.6,.0,7.6,.0,8.7,.0L12.5,.0" stroke-linecap="round" id="shape55" fill="none" stroke="#303030" transform="translate(578.71,477.10)"></path><g id="shape56" transform="translate(38.37,230.85)"><path d="M4.0,.0L137.4,.0C139.6,.0,141.4,1.8,141.4,4.0L141.4,62.4C141.4,64.6,139.6,66.4,137.4,66.4L4.0,66.4C1.8,66.4,.0,64.6,.0,62.4L.0,4.0C.0,1.8,1.8,.0,4.0,.0z" stroke-width="2" fill="#3f5cb8" fill-rule="nonzero" stroke="#3f5cb8"></path><text style="fill:#ffffff;font-family:Microsoft YaHei;font-size:18.00pt;font-weight:bold" xml:space="preserve"><tspan x="24.5" y="42.8">跳跃寻址</tspan></text></g><g id="shape57" transform="translate(242.77,137.90)"><path d="M22.6,.0L102.8,.0C115.3,.0,125.4,10.1,125.4,22.6C125.4,35.1,115.3,45.2,102.8,45.2L22.6,45.2C10.1,45.2,.0,35.1,.0,22.6C.0,10.1,10.1,.0,22.6,.0z" stroke-width="2" fill="#f5f6ff" fill-rule="nonzero" stroke="#d1d8fd"></path><text style="fill:#3f5cb8;font-family:Microsoft YaHei;font-size:14.00pt;font-weight:bold" xml:space="preserve"><tspan x="27.7" y="30.2">数据寻址</tspan></text></g><g id="shape58" transform="translate(242.77,381.35)"><path d="M22.6,.0L139.6,.0C152.1,.0,162.2,10.1,162.2,22.6C162.2,35.1,152.1,45.2,139.6,45.2L22.6,45.2C10.1,45.2,.0,35.1,.0,22.6C.0,10.1,10.1,.0,22.6,.0z" stroke-width="2" fill="#f5f6ff" fill-rule="nonzero" stroke="#d1d8fd"></path><text style="fill:#3f5cb8;font-family:Microsoft YaHei;font-size:14.00pt;font-weight:bold" xml:space="preserve"><tspan x="27.7" y="30.2">转移地址寻址</tspan></text></g><g id="shape59" transform="translate(393.15,37.10)"><path d="M13.9,.0L136.0,.0C143.6,.0,149.9,6.2,149.9,13.9C149.9,21.6,143.6,27.8,136.0,27.8L13.9,27.8C6.2,27.8,.0,21.6,.0,13.9C.0,6.2,6.2,.0,13.9,.0z" fill="none" stroke="#e3e3e3"></path><text style="fill:#303030;font-family:Microsoft YaHei;font-size:10.00pt" xml:space="preserve"><tspan x="15.5" y="19.1">立即（数）寻址方式</tspan></text></g><g id="shape60" transform="translate(393.15,73.60)"><path d="M13.9,.0L108.8,.0C116.4,.0,122.7,6.2,122.7,13.9C122.7,21.6,116.4,27.8,108.8,27.8L13.9,27.8C6.2,27.8,.0,21.6,.0,13.9C.0,6.2,6.2,.0,13.9,.0z" fill="none" stroke="#e3e3e3"></path><text style="fill:#303030;font-family:Microsoft YaHei;font-size:10.00pt" xml:space="preserve"><tspan x="15.5" y="19.1">寄存器寻址方式</tspan></text></g><g id="shape61" transform="translate(393.15,183.10)"><path d="M13.9,.0L81.6,.0C89.2,.0,95.5,6.2,95.5,13.9C95.5,21.6,89.2,27.8,81.6,27.8L13.9,27.8C6.2,27.8,.0,21.6,.0,13.9C.0,6.2,6.2,.0,13.9,.0z" fill="none" stroke="#e3e3e3"></path><text style="fill:#303030;font-family:Microsoft YaHei;font-size:10.00pt" xml:space="preserve"><tspan x="15.5" y="19.1">存储器寻址</tspan></text></g><g id="shape62" transform="translate(513.61,110.10)"><path d="M13.9,.0L95.2,.0C102.8,.0,109.1,6.2,109.1,13.9C109.1,21.6,102.8,27.8,95.2,27.8L13.9,27.8C6.2,27.8,.0,21.6,.0,13.9C.0,6.2,6.2,.0,13.9,.0z" fill="none" stroke="#e3e3e3"></path><text style="fill:#303030;font-family:Microsoft YaHei;font-size:10.00pt" xml:space="preserve"><tspan x="15.5" y="19.1">直接寻址方式</tspan></text></g><g id="shape63" transform="translate(513.61,146.60)"><path d="M13.9,.0L136.0,.0C143.6,.0,149.9,6.2,149.9,13.9C149.9,21.6,143.6,27.8,136.0,27.8L13.9,27.8C6.2,27.8,.0,21.6,.0,13.9C.0,6.2,6.2,.0,13.9,.0z" fill="none" stroke="#e3e3e3"></path><text style="fill:#303030;font-family:Microsoft YaHei;font-size:10.00pt" xml:space="preserve"><tspan x="15.5" y="19.1">寄存器间接寻址方式</tspan></text></g><g id="shape64" transform="translate(513.61,183.10)"><path d="M13.9,.0L122.4,.0C130.0,.0,136.3,6.2,136.3,13.9C136.3,21.6,130.0,27.8,122.4,27.8L13.9,27.8C6.2,27.8,.0,21.6,.0,13.9C.0,6.2,6.2,.0,13.9,.0z" fill="none" stroke="#e3e3e3"></path><text style="fill:#303030;font-family:Microsoft YaHei;font-size:10.00pt" xml:space="preserve"><tspan x="15.5" y="19.1">基址变址寻址方式</tspan></text></g><g id="shape65" transform="translate(513.61,256.10)"><path d="M13.9,.0L149.6,.0C157.2,.0,163.5,6.2,163.5,13.9C163.5,21.6,157.2,27.8,149.6,27.8L13.9,27.8C6.2,27.8,.0,21.6,.0,13.9C.0,6.2,6.2,.0,13.9,.0z" fill="none" stroke="#e3e3e3"></path><text style="fill:#303030;font-family:Microsoft YaHei;font-size:10.00pt" xml:space="preserve"><tspan x="15.5" y="19.1">相对基质变址寻址方式</tspan></text></g><g id="shape66" transform="translate(568.01,37.10)"><path d="M13.9,.0L88.0,.0C95.6,.0,101.9,6.2,101.9,13.9C101.9,21.6,95.6,27.8,88.0,27.8L13.9,27.8C6.2,27.8,.0,21.6,.0,13.9C.0,6.2,6.2,.0,13.9,.0z" fill="none" stroke="#e3e3e3"></path><text style="fill:#303030;font-family:Microsoft YaHei;font-size:10.00pt" xml:space="preserve"><tspan x="15.5" y="19.1">MOV AL,18</tspan></text></g><g id="shape67" transform="translate(540.81,73.60)"><path d="M13.9,.0L91.2,.0C98.8,.0,105.1,6.2,105.1,13.9C105.1,21.6,98.8,27.8,91.2,27.8L13.9,27.8C6.2,27.8,.0,21.6,.0,13.9C.0,6.2,6.2,.0,13.9,.0z" fill="none" stroke="#e3e3e3"></path><text style="fill:#303030;font-family:Microsoft YaHei;font-size:10.00pt" xml:space="preserve"><tspan x="15.5" y="19.1">MOV AX,BX</tspan></text></g><g id="shape68" transform="translate(647.66,110.10)"><path d="M13.9,.0L117.6,.0C125.2,.0,131.5,6.2,131.5,13.9C131.5,21.6,125.2,27.8,117.6,27.8L13.9,27.8C6.2,27.8,.0,21.6,.0,13.9C.0,6.2,6.2,.0,13.9,.0z" fill="none" stroke="#e3e3e3"></path><text style="fill:#303030;font-family:Microsoft YaHei;font-size:10.00pt" xml:space="preserve"><tspan x="15.5" y="19.1">MOV AX,[400H]</tspan></text></g><g id="shape69" transform="translate(688.46,146.60)"><path d="M13.9,.0L95.2,.0C102.8,.0,109.1,6.2,109.1,13.9C109.1,21.6,102.8,27.8,95.2,27.8L13.9,27.8C6.2,27.8,.0,21.6,.0,13.9C.0,6.2,6.2,.0,13.9,.0z" fill="none" stroke="#e3e3e3"></path><text style="fill:#303030;font-family:Microsoft YaHei;font-size:10.00pt" xml:space="preserve"><tspan x="15.5" y="19.1">MOV AX,[SI]</tspan></text></g><g id="shape70" transform="translate(674.86,183.10)"><path d="M13.9,.0L122.4,.0C130.0,.0,136.3,6.2,136.3,13.9C136.3,21.6,130.0,27.8,122.4,27.8L13.9,27.8C6.2,27.8,.0,21.6,.0,13.9C.0,6.2,6.2,.0,13.9,.0z" fill="none" stroke="#e3e3e3"></path><text style="fill:#303030;font-family:Microsoft YaHei;font-size:10.00pt" xml:space="preserve"><tspan x="15.5" y="19.1">MOV AX,[BX][SI]</tspan></text></g><g id="shape71" transform="translate(702.06,256.10)"><path d="M13.9,.0L152.8,.0C160.4,.0,166.7,6.2,166.7,13.9C166.7,21.6,160.4,27.8,152.8,27.8L13.9,27.8C6.2,27.8,.0,21.6,.0,13.9C.0,6.2,6.2,.0,13.9,.0z" fill="none" stroke="#e3e3e3"></path><text style="fill:#303030;font-family:Microsoft YaHei;font-size:10.00pt" xml:space="preserve"><tspan x="15.5" y="19.1">MOV AX,DISP[BX][SI]</tspan></text></g><g id="shape72" transform="translate(429.95,335.30)"><path d="M13.9,.0L122.4,.0C130.0,.0,136.3,6.2,136.3,13.9C136.3,21.6,130.0,27.8,122.4,27.8L13.9,27.8C6.2,27.8,.0,21.6,.0,13.9C.0,6.2,6.2,.0,13.9,.0z" fill="none" stroke="#e3e3e3"></path><text style="fill:#303030;font-family:Microsoft YaHei;font-size:10.00pt" xml:space="preserve"><tspan x="15.5" y="19.1">段内直接寻址方式</tspan></text></g><g id="shape73" transform="translate(429.95,390.20)"><path d="M13.9,.0L122.4,.0C130.0,.0,136.3,6.2,136.3,13.9C136.3,21.6,130.0,27.8,122.4,27.8L13.9,27.8C6.2,27.8,.0,21.6,.0,13.9C.0,6.2,6.2,.0,13.9,.0z" fill="none" stroke="#e3e3e3"></path><text style="fill:#303030;font-family:Microsoft YaHei;font-size:10.00pt" xml:space="preserve"><tspan x="15.5" y="19.1">段内间接寻址方式</tspan></text></g><g id="shape74" transform="translate(429.95,426.70)"><path d="M13.9,.0L122.4,.0C130.0,.0,136.3,6.2,136.3,13.9C136.3,21.6,130.0,27.8,122.4,27.8L13.9,27.8C6.2,27.8,.0,21.6,.0,13.9C.0,6.2,6.2,.0,13.9,.0z" fill="none" stroke="#e3e3e3"></path><text style="fill:#303030;font-family:Microsoft YaHei;font-size:10.00pt" xml:space="preserve"><tspan x="15.5" y="19.1">段间直接寻址方式</tspan></text></g><g id="shape75" transform="translate(429.95,463.20)"><path d="M13.9,.0L122.4,.0C130.0,.0,136.3,6.2,136.3,13.9C136.3,21.6,130.0,27.8,122.4,27.8L13.9,27.8C6.2,27.8,.0,21.6,.0,13.9C.0,6.2,6.2,.0,13.9,.0z" fill="none" stroke="#e3e3e3"></path><text style="fill:#303030;font-family:Microsoft YaHei;font-size:10.00pt" xml:space="preserve"><tspan x="15.5" y="19.1">段间间接寻址方式</tspan></text></g><g id="shape76" transform="translate(591.21,316.90)"><path d="M32.3,.0L173.7,.0C191.5,.0,206.0,14.5,206.0,32.3C206.0,50.1,191.5,64.6,173.7,64.6L32.3,64.6C14.5,64.6,.0,50.1,.0,32.3C.0,14.5,14.5,.0,32.3,.0z" fill="none" stroke="#e3e3e3"></path><text style="fill:#303030;font-family:Microsoft YaHei;font-size:10.00pt" xml:space="preserve"><tspan x="27.8" y="19.6">JMP NEAR  PTR ADDR1</tspan><tspan x="27.8" y="38.0">JMP SHORT ADDR2</tspan><tspan x="27.8" y="56.4">JMP 400H</tspan></text></g><g id="shape77" transform="translate(591.21,390.20)"><path d="M13.9,.0L62.4,.0C70.0,.0,76.3,6.2,76.3,13.9C76.3,21.6,70.0,27.8,62.4,27.8L13.9,27.8C6.2,27.8,.0,21.6,.0,13.9C.0,6.2,6.2,.0,13.9,.0z" fill="none" stroke="#e3e3e3"></path><text style="fill:#303030;font-family:Microsoft YaHei;font-size:10.00pt" xml:space="preserve"><tspan x="15.5" y="19.1">JMP BX</tspan></text></g><g id="shape78" transform="translate(591.21,426.70)"><path d="M13.9,.0L150.4,.0C158.0,.0,164.3,6.2,164.3,13.9C164.3,21.6,158.0,27.8,150.4,27.8L13.9,27.8C6.2,27.8,.0,21.6,.0,13.9C.0,6.2,6.2,.0,13.9,.0z" fill="none" stroke="#e3e3e3"></path><text style="fill:#303030;font-family:Microsoft YaHei;font-size:10.00pt" xml:space="preserve"><tspan x="15.5" y="19.1">JMP FAR PTR ADDR4</tspan></text></g><g id="shape79" transform="translate(591.21,463.20)"><path d="M13.9,.0L220.8,.0C228.4,.0,234.7,6.2,234.7,13.9C234.7,21.6,228.4,27.8,220.8,27.8L13.9,27.8C6.2,27.8,.0,21.6,.0,13.9C.0,6.2,6.2,.0,13.9,.0z" fill="none" stroke="#e3e3e3"></path><text style="fill:#303030;font-family:Microsoft YaHei;font-size:10.00pt" xml:space="preserve"><tspan x="15.5" y="19.1">JMP DWORD PTR [ADDR5 +BX]</tspan></text></g><g id="shape80" transform="translate(513.61,219.60)"><path d="M13.9,.0L136.0,.0C143.6,.0,149.9,6.2,149.9,13.9C149.9,21.6,143.6,27.8,136.0,27.8L13.9,27.8C6.2,27.8,.0,21.6,.0,13.9C.0,6.2,6.2,.0,13.9,.0z" fill="none" stroke="#e3e3e3"></path><text style="fill:#303030;font-family:Microsoft YaHei;font-size:10.00pt" xml:space="preserve"><tspan x="15.5" y="19.1">寄存器相对寻址方式</tspan></text></g><g id="shape81" transform="translate(688.46,219.60)"><path d="M13.9,.0L128.0,.0C135.6,.0,141.9,6.2,141.9,13.9C141.9,21.6,135.6,27.8,128.0,27.8L13.9,27.8C6.2,27.8,.0,21.6,.0,13.9C.0,6.2,6.2,.0,13.9,.0z" fill="none" stroke="#e3e3e3"></path><text style="fill:#303030;font-family:Microsoft YaHei;font-size:10.00pt" xml:space="preserve"><tspan x="15.5" y="19.1">MOV AX,DISP[DI]</tspan></text></g></g></svg></div>





<h2 id="1-0-隐含寻址方式"><a href="#1-0-隐含寻址方式" class="headerlink" title="1.0 隐含寻址方式"></a>1.0 隐含寻址方式</h2><p>常用指令：PUSH,POP,等。</p>
<p>多体现在一些特定指令。如     PUSH;POP指令等寄存器或地址在指令中不存在，操作的地址为默认的。</p>
<h2 id="2-0-立即寻址方式"><a href="#2-0-立即寻址方式" class="headerlink" title="2.0 立即寻址方式"></a>2.0 立即寻址方式</h2><p>立即寻址方式的目的就是将操作数紧跟在操作码后面，与操作码一起放在指令代码段中，在程序运行时，程序直接调用该操作数，而不需要到其他地址单元中去取相应的操作数。</p>
  <figure class="highlight plaintext"><table><tbody><tr><td class="code"><pre class=" language-hljs assembly"><code class="language-hljs assembly">MOV AL,18<br>MOV AH,80H<br></code></pre></td></tr></tbody></table></figure>

<p>代码为将18移入AX寄存器低位，80H移入AX寄存器高位。</p>
<h2 id="3-0-直接寻址方式"><a href="#3-0-直接寻址方式" class="headerlink" title="3.0 直接寻址方式"></a>3.0 直接寻址方式</h2><p>直接寻址方式时操作数地址的偏移量直接包含在指令中，和指令操作码一起放在代码段，而操作数则在数据段中。操作数的地址时数据段寄存器DS中的内容左移4位后，加上指令给定的地址偏移量。</p>
<p>格式</p>
  <figure class="highlight plaintext"><table><tbody><tr><td class="code"><pre class=" language-hljs assembly"><code class="language-hljs assembly">MOV AX,[400H]<br></code></pre></td></tr></tbody></table></figure>

<p>当数据寄存器数据 （DS）=1000H，则代码意思为将 10400H 处的地址移至AX寄存器内。<br>10000H（段基地址）+400H（偏移地址）=10400（物理地址）</p>
<h2 id="4-0-寄存器寻址方式"><a href="#4-0-寄存器寻址方式" class="headerlink" title="4.0 寄存器寻址方式"></a>4.0 寄存器寻址方式</h2><p>寄存器寻址方式中，操作数在CPU的内部寄存器中。执行时，直接操作寄存器中数。</p>
<figure class="highlight plaintext"><table><tbody><tr><td class="code"><pre class=" language-hljs assembly"><code class="language-hljs assembly">MOV AX,BX<br></code></pre></td></tr></tbody></table></figure>

<p>上述指令为将BX寄存器中数据移至AX中。</p>
<h2 id="5-0-寄存器间接寻址方式"><a href="#5-0-寄存器间接寻址方式" class="headerlink" title="5.0 寄存器间接寻址方式"></a>5.0 寄存器间接寻址方式</h2><p> 操作数的有效地址有变址寄存器SI、DIJ或基址寄存器BX、BP提供。</p>
<blockquote>
<p>  $物理地址 = 10H*(DS)+(BX、BI或DI)$</p>
</blockquote>
<figure class="highlight plaintext"><table><tbody><tr><td class="code"><pre class=" language-hljs assembly"><code class="language-hljs assembly">MOV AX,[SI]<br></code></pre></td></tr></tbody></table></figure>

<p> 如上代码，如果（DS）=2000H，（SI）=1500H，<br>$则物理地址:20000H(段基地址)+1500H(偏移地址)=21500H(物理地址)$<br>即运行完，(AX) 为 21500H 处的数据</p>
<h2 id="6-0-寄存器相对寻址方式"><a href="#6-0-寄存器相对寻址方式" class="headerlink" title="6.0 寄存器相对寻址方式"></a>6.0 寄存器相对寻址方式</h2><p>此寻址方式是以知道那个的寄存器内容，加上指令中给出的位移量（8或16位），并以一个段寄存器位基准，作为操作数的地址。</p>
<blockquote>
<p>  $物理地址=10H*(DS) +(BX、SI或DI)+8位(16位)位移量$<br>  ​       $物理地址=10H*(SS) +(BP)+8位(16位)位移量$</p>
</blockquote>
<figure class="highlight plaintext"><table><tbody><tr><td class="code"><pre class=" language-hljs assembly"><code class="language-hljs assembly">MOV AX,DISP[DI] ;或 <br>MOV AX,[DISP + DI]<br></code></pre></td></tr></tbody></table></figure>

<p>DISP 为偏移量的符号地址。</p>
<p>如果(DS)=3000H,(DI)=2000H,DISP=600H,则</p>
<p>$物理地址：30000H(段基地址)+2000H(变址)+600H(位移量)=32600H(物理地址)$</p>
<h2 id="7-0-基址加变址寻址方式"><a href="#7-0-基址加变址寻址方式" class="headerlink" title="7.0 基址加变址寻址方式"></a>7.0 基址加变址寻址方式</h2><p>通常将BX和BP看作是基址寄存器，把SI和DI作为变址寄存器。两个寄存器均由指令指定。</p>
<blockquote>
<p>   $物理地址=10H*(DS)+(BX)+(SI或DI)$<br>          $物理地址=10H*(SS)+(BP)+(SI或DI)$</p>
</blockquote>
<figure class="highlight plaintext"><table><tbody><tr><td class="code"><pre class=" language-hljs assembly"><code class="language-hljs assembly">MOV AX,[BX][DI];或<br>MOV AX,[BX+DI]<br></code></pre></td></tr></tbody></table></figure>

<p>若（DS）=1000H,(BX)=2000H,(DI)=3000H,</p>
<p>$物理地址：10000H(段基地址)+2000H(基址)+3000H(变址)=15000(物理地址)$</p>
<h2 id="8-0-相对基址变址寻址方式"><a href="#8-0-相对基址变址寻址方式" class="headerlink" title="8.0 相对基址变址寻址方式"></a>8.0 相对基址变址寻址方式</h2><p>通常把BX和BP看作基址寄存器，把SI和DI看作变址寄存器。其原理就是把一个基址寄存器BX或BP的内容，加上变址寄存器SI或DI的内容，再加上指令中给出的8或16位跑位移量，并以一个段寄存器作为地址基准，作为操作数的地址。</p>
<blockquote>
<p>$物理地址=10H*(DS)+(BX)+(SI或DI)+8或16位偏移量$<br>      $物理地址=10H*(SS)+(BP)+(SI或DI)+8或16位偏移量$</p>
</blockquote>
  <figure class="highlight plaintext"><table><tbody><tr><td class="code"><pre class=" language-hljs assembly"><code class="language-hljs assembly">MOV AX,DISP[BX][SI]<br></code></pre></td></tr></tbody></table></figure>

<p>若(DS)=4000H,(BX)=2000H,(SI)=1000H,DISP=800H,则</p>
<p>​    $物理地址：4000H(段基地址)+[2000H(基址)+1000H(变址)+800H(位移量)]=43800H$</p>
<h2 id="9-0-段寻址方式"><a href="#9-0-段寻址方式" class="headerlink" title="9.0 段寻址方式"></a>9.0 段寻址方式</h2><h3 id="9-1-段内直接寻址方式"><a href="#9-1-段内直接寻址方式" class="headerlink" title="9.1 段内直接寻址方式"></a>9.1 段内直接寻址方式</h3><p>将当前IP寄存器的内容和指令中指定的8位或16位位移量之和作为转向的有效地址。</p>
<p>这种寻址方式的汇编格式有如下3种：</p>
<ol>
<li>指令名 SHORT 转移目标地址标号。表示位移量被强制位8位，跳转距离位为-128~+127。</li>
<li>指令名 转移目标地址标号</li>
<li>指令名 NEAR PTR 转移目标地址标号。表示位移量被强制位16位，跳转距离为-32768 ~ +32767</li>
</ol>
<p>位移量可以是一个带符号的8位数，段内短程转移。也可以是一个带符号的16位数，段内近程转移。什么都不加，计算机默认为16位。</p>
<p>且无论是8/16位，地址标号在指令码中都是用补码表示的带符号数。适应于无条件转移或者条件转移，但条件转移只能有8位的位移量。</p>
<figure class="highlight plaintext"><table><tbody><tr><td class="code"><pre class=" language-hljs assembly"><code class="language-hljs assembly">JMP SHORT ADDR2<br>JMP ADDR3<br>JMP NEAR PTR ADDR1<br></code></pre></td></tr></tbody></table></figure>

<blockquote>
<p>ADDR (123) 皆为地址标号。</p>
</blockquote>
<p>例：</p>
<blockquote>
<p>  给定 (IP) =2BC0H，试为此转移指令找出转移的偏移地址。<br>  JMP NEAR PTR 5119H ；</p>
<p>  解：<br>  ​    (IP) = 5119H + ((IP) + 03H) = 7CDCH，物理地址PA = 09CDCH</p>
</blockquote>
<p> IP 的当前值是指从存储器中取出转移指令后的 IP   值（下一条指令的地址）。因为位移量是相对于当前 IP 的内容来计算的，所以又称为相对寻址。</p>
<p><a target="_blank" rel="noopener" href="https://baike.baidu.com/item/%E6%AE%B5%E5%86%85%E7%9B%B4%E6%8E%A5%E5%AF%BB%E5%9D%80"><mark>参考链接</mark></a></p>
<h3 id="9-2段内间接寻址方式"><a href="#9-2段内间接寻址方式" class="headerlink" title="9.2段内间接寻址方式"></a>9.2段内间接寻址方式</h3><p>这种方式用于段间转移，当前CS和IP由存储器中连续4个字节单元提供。</p>
<p>常用指令：JMP,</p>
<p>指令中给出访问内存单元的寻址方式。段内间接寻址的转向有效地址是一个寄存器或一个存储单元的内容，并且可以用数据寻址方式中除立即数以外的任何一种寻址方式取得转向的有效地址。</p>
<blockquote>
<p>$物理地址: 10H*(CS)+EA$     ，(EA)为有效偏移地址。</p>
</blockquote>
<figure class="highlight plaintext"><table><tbody><tr><td class="code"><pre class=" language-hljs assembly"><code class="language-hljs assembly">JMP AX;有效地址为一个寄存器<br>JMP [BX][SI];有效地址为一个存储单元<br></code></pre></td></tr></tbody></table></figure>

<p>如上指令，若(DS)=2000H,(BX)=2000H,(SI)=3000H,(25000H)=3200H,</p>
<p>则，$(IP)=(10H)*(DS)+(BX)+(SI))=(25000H)=3200H$</p>
<h3 id="9-3-段间直接寻址方式"><a href="#9-3-段间直接寻址方式" class="headerlink" title="9.3 段间直接寻址方式"></a>9.3 段间直接寻址方式</h3><p>直接提供转向的段地址（16位）和偏移地址（16位）。用指令中指定的偏移地址取代IP寄存器内容，用指定段地址取代CS寄存器内容。</p>
<figure class="highlight plaintext"><table><tbody><tr><td class="code"><pre class=" language-hljs assembly"><code class="language-hljs assembly">JMP FAR PTR ADD1 <br></code></pre></td></tr></tbody></table></figure>

<p>将其中的段地址传送给CS,偏移地址传给IP，完成程序控制间的段间转移。ADD1为装箱的符号地址，FAR PTR 则是表示段间转义的操作符。</p>
<h3 id="9-4段间间接寻址方式"><a href="#9-4段间间接寻址方式" class="headerlink" title="9.4段间间接寻址方式"></a>9.4段间间接寻址方式</h3><p>用存储器中的两个相继字的内容来取代IP和CS。内存单元的地址使用指令指定的除立即寻址和寄存器寻址方式意外的任何一种数据寻址方式取得。</p>
<figure class="highlight plaintext"><table><tbody><tr><td class="code"><pre class=" language-hljs assembly"><code class="language-hljs assembly">JMP DWORD PTR [DISP+BX]<br></code></pre></td></tr></tbody></table></figure>

<p>[DISP+BX]说明数据寻址方式位基础年起间接寻址方式，DWORD PRT 为双字操作符。</p>

                
            </div>
            <hr/>

            

    <div class="reprint" id="reprint-statement">
        
            <div class="reprint__author">
                <span class="reprint-meta" style="font-weight: bold;">
                    <i class="fas fa-user">
                        文章作者:
                    </i>
                </span>
                <span class="reprint-info">
                    <a href="/about" rel="external nofollow noreferrer">张小白</a>
                </span>
            </div>
            <div class="reprint__type">
                <span class="reprint-meta" style="font-weight: bold;">
                    <i class="fas fa-link">
                        文章链接:
                    </i>
                </span>
                <span class="reprint-info">
                    <a href="https://blogofxyz.top/2021/10/22/%E6%B1%87%E7%BC%96%E8%AF%AD%E8%A8%80%E5%AF%BB%E5%9D%80%E6%96%B9%E5%BC%8F/">https://blogofxyz.top/2021/10/22/%E6%B1%87%E7%BC%96%E8%AF%AD%E8%A8%80%E5%AF%BB%E5%9D%80%E6%96%B9%E5%BC%8F/</a>
                </span>
            </div>
            <div class="reprint__notice">
                <span class="reprint-meta" style="font-weight: bold;">
                    <i class="fas fa-copyright">
                        版权声明:
                    </i>
                </span>
                <span class="reprint-info">
                    本博客所有文章除特別声明外，均采用
                    <a href="https://creativecommons.org/licenses/by/4.0/deed.zh" rel="external nofollow noreferrer" target="_blank">CC BY 4.0</a>
                    许可协议。转载请注明来源
                    <a href="/about" target="_blank">张小白</a>
                    !
                </span>
            </div>
        
    </div>

    <script async defer>
      document.addEventListener("copy", function (e) {
        let toastHTML = '<span>复制成功，请遵循本文的转载规则</span><button class="btn-flat toast-action" onclick="navToReprintStatement()" style="font-size: smaller">查看</a>';
        M.toast({html: toastHTML})
      });

      function navToReprintStatement() {
        $("html, body").animate({scrollTop: $("#reprint-statement").offset().top - 80}, 800);
      }
    </script>



            <div class="tag_share" style="display: block;">
                <div class="post-meta__tag-list" style="display: inline-block;">
                    
                        <div class="article-tag">
                            
                                <a href="/tags/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BB%84%E6%88%90%E5%8E%9F%E7%90%86/">
                                    <span class="chip bg-color">计算机组成原理</span>
                                </a>
                            
                                <a href="/tags/%E6%B1%87%E7%BC%96%E8%AF%AD%E8%A8%80/">
                                    <span class="chip bg-color">汇编语言</span>
                                </a>
                            
                        </div>
                    
                </div>
                <div class="post_share" style="zoom: 80%; width: fit-content; display: inline-block; float: right; margin: -0.15rem 0;">
                    <link rel="stylesheet" type="text/css" href="/libs/share/css/share.min.css">
<div id="article-share">

    
    <div class="social-share" data-sites="qq,qzone,wechat,weibo" data-wechat-qrcode-helper="<p>微信扫一扫即可分享！</p>"></div>
    <script src="/libs/share/js/social-share.min.js"></script>
    

    
    <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid="></script>
    <div class="addthis_inline_share_toolbox"></div>
    

</div>

                </div>
            </div>
            
                <style>
    #reward {
        margin: 40px 0;
        text-align: center;
    }

    #reward .reward-link {
        font-size: 1.4rem;
        line-height: 38px;
    }

    #reward .btn-floating:hover {
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2), 0 5px 15px rgba(0, 0, 0, 0.2);
    }

    #rewardModal {
        width: 320px;
        height: 350px;
    }

    #rewardModal .reward-title {
        margin: 15px auto;
        padding-bottom: 5px;
    }

    #rewardModal .modal-content {
        padding: 10px;
    }

    #rewardModal .close {
        position: absolute;
        right: 15px;
        top: 15px;
        color: rgba(0, 0, 0, 0.5);
        font-size: 1.3rem;
        line-height: 20px;
        cursor: pointer;
    }

    #rewardModal .close:hover {
        color: #ef5350;
        transform: scale(1.3);
        -moz-transform:scale(1.3);
        -webkit-transform:scale(1.3);
        -o-transform:scale(1.3);
    }

    #rewardModal .reward-tabs {
        margin: 0 auto;
        width: 210px;
    }

    .reward-tabs .tabs {
        height: 38px;
        margin: 10px auto;
        padding-left: 0;
    }

    .reward-content ul {
        padding-left: 0 !important;
    }

    .reward-tabs .tabs .tab {
        height: 38px;
        line-height: 38px;
    }

    .reward-tabs .tab a {
        color: #fff;
        background-color: #ccc;
    }

    .reward-tabs .tab a:hover {
        background-color: #ccc;
        color: #fff;
    }

    .reward-tabs .wechat-tab .active {
        color: #fff !important;
        background-color: #22AB38 !important;
    }

    .reward-tabs .alipay-tab .active {
        color: #fff !important;
        background-color: #019FE8 !important;
    }

    .reward-tabs .reward-img {
        width: 210px;
        height: 210px;
    }
</style>

<div id="reward">
    <a href="#rewardModal" class="reward-link modal-trigger btn-floating btn-medium waves-effect waves-light red">赏</a>

    <!-- Modal Structure -->
    <div id="rewardModal" class="modal">
        <div class="modal-content">
            <a class="close modal-close"><i class="fas fa-times"></i></a>
            <h4 class="reward-title">你的赏识是我前进的动力</h4>
            <div class="reward-content">
                <div class="reward-tabs">
                    <ul class="tabs row">
                        <li class="tab col s6 alipay-tab waves-effect waves-light"><a href="#alipay">支付宝</a></li>
                        <li class="tab col s6 wechat-tab waves-effect waves-light"><a href="#wechat">微 信</a></li>
                    </ul>
                    <div id="alipay">
                        <img src="/medias/reward/alipay.png" class="reward-img" alt="支付宝打赏二维码">
                    </div>
                    <div id="wechat">
                        <img src="/medias/reward/wechat.png" class="reward-img" alt="微信打赏二维码">
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
    $(function () {
        $('.tabs').tabs();
    });
</script>

            
        </div>
    </div>

    

    

    

    

    
        <style>
    .valine-card {
        margin: 1.5rem auto;
    }

    .valine-card .card-content {
        padding: 20px 20px 5px 20px;
    }

    #vcomments textarea {
        box-sizing: border-box;
        background: url("/medias/comment_bg.JPG") 100% 100% no-repeat;
	    color: white;
    opacity: 0.8;
    font-size: 18px;
    }

    #vcomments p {
        margin: 2px 2px 10px;
        font-size: 1.05rem;
        line-height: 1.78rem;
    }

    #vcomments blockquote p {
        text-indent: 0.2rem;
    }

    #vcomments a {
        padding: 0 2px;
        color: #4cbf30;
        font-weight: 500;
        text-decoration: none;
    }

    #vcomments img {
        max-width: 100%;
        height: auto;
        cursor: pointer;
    }

    #vcomments ol li {
        list-style-type: decimal;
    }

    #vcomments ol,
    ul {
        display: block;
        padding-left: 2em;
        word-spacing: 0.05rem;
    }

    #vcomments ul li,
    ol li {
	text-indent:2rem;
        display: list-item;
        line-height: 2.2rem;
        font-size: 1rem;
    }

    #vcomments ul li {
        list-style-type: disc;
    }

    #vcomments ul ul li {
        list-style-type: circle;
    }

    #vcomments table, th, td {
        padding: 12px 13px;
        border: 1px solid #dfe2e5;
    }

    #vcomments table, th, td {
        border: 0;
    }

    table tr:nth-child(2n), thead {
        background-color: #fafafa;
    }

    #vcomments table th {
        background-color: #f2f2f2;
        min-width: 80px;
    }

    #vcomments table td {
        min-width: 80px;
    }

    #vcomments h1 {
        font-size: 1.85rem;
        font-weight: bold;
        line-height: 2.2rem;
    }

    #vcomments h2 {
        font-size: 1.65rem;
        font-weight: bold;
        line-height: 1.9rem;
    }

    #vcomments h3 {
        font-size: 1.45rem;
        font-weight: bold;
        line-height: 1.7rem;
    }

    #vcomments h4 {
        font-size: 1.25rem;
        font-weight: bold;
        line-height: 1.5rem;
    }

    #vcomments h5 {
        font-size: 1.1rem;
        font-weight: bold;
        line-height: 1.4rem;
    }

    #vcomments h6 {
        font-size: 1rem;
        line-height: 1.3rem;
    }

    #vcomments p {
        font-size: 1rem;
        line-height: 1.5rem;
    }

    #vcomments hr {
        margin: 12px 0;
        border: 0;
        border-top: 1px solid #ccc;
    }

    #vcomments blockquote {
        margin: 15px 0;
        border-left: 5px solid #42b983;
        padding: 1rem 0.8rem 0.3rem 0.8rem;
        color: #666;
        background-color: rgba(66, 185, 131, .1);
    }

    #vcomments pre {
        font-family: monospace, monospace;
        padding: 1.2em;
        margin: .5em 0;
        background: #272822;
        overflow: auto;
        border-radius: 0.3em;
        tab-size: 4;
    }

    #vcomments code {
        font-family: monospace, monospace;
        padding: 1px 3px;
        font-size: 0.92rem;
        color: #e96900;
        background-color: #f8f8f8;
        border-radius: 2px;
    }

    #vcomments pre code {
        font-family: monospace, monospace;
        padding: 0;
        color: #e8eaf6;
        background-color: #272822;
    }

    #vcomments pre[class*="language-"] {
        padding: 1.2em;
        margin: .5em 0;
    }

    #vcomments code[class*="language-"],
    pre[class*="language-"] {
        color: #e8eaf6;
    }

    #vcomments [type="checkbox"]:not(:checked), [type="checkbox"]:checked {
        position: inherit;
        margin-left: -1.3rem;
        margin-right: 0.4rem;
        margin-top: -1px;
        vertical-align: middle;
        left: unset;
        visibility: visible;
    }

    #vcomments b,
    strong {
        font-weight: bold;
    }

    #vcomments dfn {
        font-style: italic;
    }

    #vcomments small {
        font-size: 85%;
    }

    #vcomments cite {
        font-style: normal;
    }

    #vcomments mark {
        background-color: #fcf8e3;
        padding: .2em;
    }

    #vcomments table, th, td {
        padding: 12px 13px;
        border: 1px solid #dfe2e5;
    }

    table tr:nth-child(2n), thead {
        background-color: #fafafa;
    }

    #vcomments table th {
        background-color: #f2f2f2;
        min-width: 80px;
    }

    #vcomments table td {
        min-width: 80px;
    }

    #vcomments [type="checkbox"]:not(:checked), [type="checkbox"]:checked {
        position: inherit;
        margin-left: -1.3rem;
        margin-right: 0.4rem;
        margin-top: -1px;
        vertical-align: middle;
        left: unset;
        visibility: visible;
    }
	.v[data-class="v"] .vwrap .vheader .vinput {
		width: 32%;
		border-bottom: 1px dashed #dedede;
	}
</style>

<div class="card valine-card" data-aos="fade-up">
    <div class="comment_headling" style="font-size: 20px; font-weight: 700; position: relative; padding-left: 20px; top: 15px; padding-bottom: 5px;">
        <i class="fas fa-comments fa-fw" aria-hidden="true"></i>
        <span>评论</span>
    </div>
    <div id="vcomments" class="card-content" style="display: grid">
    </div>
</div>

<script src="/libs/valine/av-min.js"></script>
<script src="/libs/valine/Valine.min.js"></script>
<script>
	let metaPlaceholder = {"nick":"昵称/QQ号(必填)","mail":"邮箱(必填)","link":"网址(https://)"} ;
	
	new Valine({
			el: '#vcomments',
			appId: 'ghConjcbp7CpCRHJFPIRDdd2-gzGzoHsz',
			appKey: 'XnhsRQe0DKrPj7X8NnqYg6BX',
			notify: 'true' === 'true',
			verify: 'true' === 'true',
			visitor: 'true' === 'true',
			avatar: 'identicon',
			pageSize: '10',
			lang: 'zh-CN',
			placeholder: '有事不怕打扰，如果较急，可使用右侧反馈快速接受。',
			meta: ["y-nick", "e-mail", "your-link"],
			recordIP: 'true' === 'true',
			enableQQ: 'identicon',
			requiredFields: ["721850218d5dfa3e2ad5b3ac5a69dad8"],
			master: ["721850218d5dfa3e2ad5b3ac5a69dad8"],
			friends: ["4802978b7156ffcf24b571b35c594ad7"],
			tagMeta: ["发文地", "认识地", "过路地"],
			metaPlaceholder: metaPlaceholder,
		});
</script>

<!--酷Q推送-->


    

    

    

    

    

<article id="prenext-posts" class="prev-next articles">
    <div class="row article-row">
        
        <div class="article col s12 m6" data-aos="fade-up">
            <div class="article-badge left-badge text-color">
                <i class="fas fa-chevron-left"></i>&nbsp;上一篇</div>
            <div class="card">
                <a href="/2021/10/26/%EF%BC%88%E8%A1%A5%E5%85%85%E4%B8%AD%EF%BC%89%E7%BD%91%E7%BB%9C&%E8%BD%AF%E4%BB%B6%E7%BC%A9%E5%86%99/">
                    <div class="card-image">
                        
                        
                        <img src="/medias/featureimages/14.jpg" class="responsive-img" alt="（补充中）名词缩写">
                        
                        <span class="card-title">（补充中）名词缩写</span>
                    </div>
                </a>
                <div class="card-content article-content">
                    <div class="summary block-with-text">
                        
                            对计算机网络、与一些语言中的名词进行的整理。
                        
                    </div>
                    <div class="publish-info">
                        <span class="publish-date">
                            <i class="far fa-clock fa-fw icon-date"></i>2021-10-26
                        </span>
                        <span class="publish-author">
                            
                            <i class="fas fa-bookmark fa-fw icon-category"></i>
                            
                            <a href="/categories/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BD%91%E7%BB%9C/" class="post-category">
                                    计算机网络
                                </a>
                            
                            <a href="/categories/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BD%91%E7%BB%9C/%E8%BD%AF%E4%BB%B6%E5%B7%A5%E7%A8%8B/" class="post-category">
                                    软件工程
                                </a>
                            
                            
                        </span>
                    </div>
                </div>
                
                <div class="card-action article-tags">
                    
                    <a href="/tags/%E5%90%8D%E8%AF%8D%E8%8B%B1%E6%96%87%E7%BC%A9%E5%86%99/">
                        <span class="chip bg-color">名词英文缩写</span>
                    </a>
                    
                </div>
                
            </div>
        </div>
        
        
        <div class="article col s12 m6" data-aos="fade-up">
            <div class="article-badge right-badge text-color">
                下一篇&nbsp;<i class="fas fa-chevron-right"></i>
            </div>
            <div class="card">
                <a href="/2021/10/16/%E4%BC%AA%E9%80%89%E6%8B%A9%E5%99%A8/">
                    <div class="card-image">
                        
                        
                        <img src="/medias/featureimages/6.jpg" class="responsive-img" alt="伪选择器">
                        
                        <span class="card-title">伪选择器</span>
                    </div>
                </a>
                <div class="card-content article-content">
                    <div class="summary block-with-text">
                        
                            CSS中学的几个伪选择器
                        
                    </div>
                    <div class="publish-info">
                            <span class="publish-date">
                                <i class="far fa-clock fa-fw icon-date"></i>2021-10-16
                            </span>
                        <span class="publish-author">
                            
                            <i class="fas fa-bookmark fa-fw icon-category"></i>
                            
                            <a href="/categories/CSS/" class="post-category">
                                    CSS
                                </a>
                            
                            <a href="/categories/CSS/HTML/" class="post-category">
                                    HTML
                                </a>
                            
                            
                        </span>
                    </div>
                </div>
                
                <div class="card-action article-tags">
                    
                    <a href="/tags/CSS/">
                        <span class="chip bg-color">CSS</span>
                    </a>
                    
                    <a href="/tags/HTML/">
                        <span class="chip bg-color">HTML</span>
                    </a>
                    
                </div>
                
            </div>
        </div>
        
    </div>
</article>

</div>


<script>
    $('#articleContent').on('copy', function (e) {
        // IE8 or earlier browser is 'undefined'
        if (typeof window.getSelection === 'undefined') return;

        var selection = window.getSelection();
        // if the selection is short let's not annoy our users.
        if (('' + selection).length < Number.parseInt('120')) {
            return;
        }

        // create a div outside of the visible area and fill it with the selected text.
        var bodyElement = document.getElementsByTagName('body')[0];
        var newdiv = document.createElement('div');
        newdiv.style.position = 'absolute';
        newdiv.style.left = '-99999px';
        bodyElement.appendChild(newdiv);
        newdiv.appendChild(selection.getRangeAt(0).cloneContents());

        // we need a <pre> tag workaround.
        // otherwise the text inside "pre" loses all the line breaks!
        if (selection.getRangeAt(0).commonAncestorContainer.nodeName === 'PRE' || selection.getRangeAt(0).commonAncestorContainer.nodeName === 'CODE') {
            newdiv.innerHTML = "<pre>" + newdiv.innerHTML + "</pre>";
        }

        var url = document.location.href;
        newdiv.innerHTML += '<br />'
            + '来源: X-Y-Z`s Blog<br />'
            + '文章作者: Zhang-little-white<br />'
            + '文章链接: <a href="' + url + '">' + url + '</a><br />'
            + '本文章著作权归作者所有，任何形式的转载都请注明出处。';

        selection.selectAllChildren(newdiv);
        window.setTimeout(function () {bodyElement.removeChild(newdiv);}, 200);
    });
</script>


<!-- 代码块功能依赖 -->
<script type="text/javascript" src="/libs/codeBlock/codeBlockFuction.js"></script>

<!-- 代码语言 -->

<script type="text/javascript" src="/libs/codeBlock/codeLang.js"></script>


<!-- 代码块复制 -->

<script type="text/javascript" src="/libs/codeBlock/codeCopy.js"></script>


<!-- 代码块收缩 -->

<script type="text/javascript" src="/libs/codeBlock/codeShrink.js"></script>


    </div>
    <div id="toc-aside" class="expanded col l3 hide-on-med-and-down">
        <div class="toc-widget card">
            <div class="toc-title"><i class="far fa-list-alt"></i>&nbsp;&nbsp;目录</div>
            <div id="toc-content"></div>
        </div>
    </div>
</div>

<!-- TOC 悬浮按钮. -->

<div id="floating-toc-btn" class="hide-on-med-and-down">
    <a class="btn-floating btn-large bg-color">
        <i class="fas fa-list-ul"></i>
    </a>
</div>


<script src="/libs/tocbot/tocbot.min.js"></script>
<script>
    $(function () {
        tocbot.init({
            tocSelector: '#toc-content',
            contentSelector: '#articleContent',
            headingsOffset: -($(window).height() * 0.4 - 45),
            collapseDepth: Number('2'),
            headingSelector: 'h1,h2, h3, h4, h5'
        });

        // modify the toc link href to support Chinese.
        let i = 0;
        let tocHeading = 'toc-heading-';
        $('#toc-content a').each(function () {
            $(this).attr('href', '#' + tocHeading + (++i));
        });

        // modify the heading title id to support Chinese.
        i = 0;
        $('#articleContent').children('h1,h2, h3, h4, h5').each(function () {
            $(this).attr('id', tocHeading + (++i));
        });

        // Set scroll toc fixed.
        let tocHeight = parseInt($(window).height() * 0.4 - 64);
        let $tocWidget = $('.toc-widget');
        $(window).scroll(function () {
            let scroll = $(window).scrollTop();
            /* add post toc fixed. */
            if (scroll > tocHeight) {
                $tocWidget.addClass('toc-fixed');
            } else {
                $tocWidget.removeClass('toc-fixed');
            }
        });

        
        /* 修复文章卡片 div 的宽度. */
        let fixPostCardWidth = function (srcId, targetId) {
            let srcDiv = $('#' + srcId);
            if (srcDiv.length === 0) {
                return;
            }

            let w = srcDiv.width();
            if (w >= 450) {
                w = w + 21;
            } else if (w >= 350 && w < 450) {
                w = w + 18;
            } else if (w >= 300 && w < 350) {
                w = w + 16;
            } else {
                w = w + 14;
            }
            $('#' + targetId).width(w);
        };

        // 切换TOC目录展开收缩的相关操作.
        const expandedClass = 'expanded';
        let $tocAside = $('#toc-aside');
        let $mainContent = $('#main-content');
        $('#floating-toc-btn .btn-floating').click(function () {
            if ($tocAside.hasClass(expandedClass)) {
                $tocAside.removeClass(expandedClass).hide();
                $mainContent.removeClass('l9');
            } else {
                $tocAside.addClass(expandedClass).show();
                $mainContent.addClass('l9');
            }
            fixPostCardWidth('artDetail', 'prenext-posts');
        });
        
    });
</script>

    

</main>


<script src="https://cdn.bootcss.com/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script>
    MathJax.Hub.Config({
        tex2jax: {inlineMath: [['$', '$'], ['\(', '\)']]}
    });
</script>



    <footer class="page-footer bg-color">
    

    <div class="container row center-align"
         style="margin-bottom: 15px !important;">
        <div class="col s12 m8 l8 copy-right">
            Copyright&nbsp;&copy;
            
                <span id="year">2021-2022</span>
            
            <span id="year">2021</span>
            <a href="/about" target="_blank">Zhang-little-white</a>
            |&nbsp;Powered by&nbsp;<a href="https://hexo.io/" target="_blank">Hexo</a>
            |&nbsp;Theme&nbsp;<a href="https://github.com/blinkfox/hexo-theme-matery" target="_blank">Matery</a>
            <br>
            
                &nbsp;<i class="fas fa-chart-area"></i>&nbsp;站点总字数:&nbsp;<span
                        class="white-color">53.2k</span>
            
            
            
            
            
            <br>

            <!-- 运行天数提醒. -->
            
                <span id="sitetime"> Loading ...</span>
                <script>
                    var calcSiteTime = function () {
                        var seconds = 1000;
                        var minutes = seconds * 60;
                        var hours = minutes * 60;
                        var days = hours * 24;
                        var years = days * 365;
                        var today = new Date();
                        var startYear = "2021";
                        var startMonth = "8";
                        var startDate = "12";
                        var startHour = "0";
                        var startMinute = "0";
                        var startSecond = "0";
                        var todayYear = today.getFullYear();
                        var todayMonth = today.getMonth() + 1;
                        var todayDate = today.getDate();
                        var todayHour = today.getHours();
                        var todayMinute = today.getMinutes();
                        var todaySecond = today.getSeconds();
                        var t1 = Date.UTC(startYear, startMonth, startDate, startHour, startMinute, startSecond);
                        var t2 = Date.UTC(todayYear, todayMonth, todayDate, todayHour, todayMinute, todaySecond);
                        var diff = t2 - t1;
                        var diffYears = Math.floor(diff / years);
                        var diffDays = Math.floor((diff / days) - diffYears * 365);

                        // 区分是否有年份.
                        var language = 'zh-CN';
                        if (startYear === String(todayYear)) {
                            document.getElementById("year").innerHTML = todayYear;
                            var daysTip = 'This site has been running for ' + diffDays + ' days';
                            if (language === 'zh-CN') {
                                daysTip = '本站已运行 ' + diffDays + ' 天';
                            } else if (language === 'zh-HK') {
                                daysTip = '本站已運行 ' + diffDays + ' 天';
                            }
                            document.getElementById("sitetime").innerHTML = daysTip;
                        } else {
                            document.getElementById("year").innerHTML = startYear + " - " + todayYear;
                            var yearsAndDaysTip = 'This site has been running for ' + diffYears + ' years and '
                                + diffDays + ' days';
                            if (language === 'zh-CN') {
                                yearsAndDaysTip = '本站已运行 ' + diffYears + ' 年 ' + diffDays + ' 天';
                            } else if (language === 'zh-HK') {
                                yearsAndDaysTip = '本站已運行 ' + diffYears + ' 年 ' + diffDays + ' 天';
                            }
                            document.getElementById("sitetime").innerHTML = yearsAndDaysTip;
                        }
                    }
                    calcSiteTime();
                </script>
            
            <br>
            
                <span id="icp">
				<img src="/medias/icp.png"豫ICP备2021025736号
                                    style="vertical-align: text-bottom;"/>
                <a href="https://beian.miit.gov.cn" target="_blank">豫ICP备2021025736号</a>
            </span>
            
        </div>
        <div class="col s12 m4 l4 social-link ">
    <a href="https://github.com/xiaohuixian" class="tooltipped" target="_blank" data-tooltip="visit my GitHub" data-position="top" data-delay="50">
        <i class="fab fa-github"></i>
    </a>



    <a href="mailto:1970476603@qq.com" class="tooltipped" target="_blank" data-tooltip="邮件联系" data-position="top" data-delay="50">
        <i class="fas fa-envelope-open"></i>
    </a>







    <a href="tencent://AddContact/?fromId=50&fromSubId=1&subcmd=all&uin=1970476603" class="tooltipped" target="_blank" data-tooltip="QQ联系我: 1970476603" data-position="top" data-delay="50">
        <i class="fab fa-qq"></i>
    </a>







    <a href="/atom.xml" class="tooltipped" target="_blank" data-tooltip="RSS 订阅" data-position="top" data-delay="50">
        <i class="fas fa-rss"></i>
    </a>

</div>
    </div>
				
</footer>

<div class="progress-bar"></div>


    <!-- 搜索遮罩框 -->
<div id="searchModal" class="modal">
    <div class="modal-content">
        <div class="search-header">
            <span class="title"><i class="fas fa-search"></i>&nbsp;&nbsp;搜索</span>
            <input type="search" id="searchInput" name="s" placeholder="请输入搜索的关键字"
                   class="search-input">
        </div>
        <div id="searchResult"></div>
    </div>
</div>

<script type="text/javascript">
$(function () {
    var searchFunc = function (path, search_id, content_id) {
        'use strict';
        $.ajax({
            url: path,
            dataType: "xml",
            success: function (xmlResponse) {
                // get the contents from search data
                var datas = $("entry", xmlResponse).map(function () {
                    return {
                        title: $("title", this).text(),
                        content: $("content", this).text(),
                        url: $("url", this).text()
                    };
                }).get();
                var $input = document.getElementById(search_id);
                var $resultContent = document.getElementById(content_id);
                $input.addEventListener('input', function () {
                    var str = '<ul class=\"search-result-list\">';
                    var keywords = this.value.trim().toLowerCase().split(/[\s\-]+/);
                    $resultContent.innerHTML = "";
                    if (this.value.trim().length <= 0) {
                        return;
                    }
                    // perform local searching
                    datas.forEach(function (data) {
                        var isMatch = true;
                        var data_title = data.title.trim().toLowerCase();
                        var data_content = data.content.trim().replace(/<[^>]+>/g, "").toLowerCase();
                        var data_url = data.url;
                        data_url = data_url.indexOf('/') === 0 ? data.url : '/' + data_url;
                        var index_title = -1;
                        var index_content = -1;
                        var first_occur = -1;
                        // only match artiles with not empty titles and contents
                        if (data_title !== '' && data_content !== '') {
                            keywords.forEach(function (keyword, i) {
                                index_title = data_title.indexOf(keyword);
                                index_content = data_content.indexOf(keyword);
                                if (index_title < 0 && index_content < 0) {
                                    isMatch = false;
                                } else {
                                    if (index_content < 0) {
                                        index_content = 0;
                                    }
                                    if (i === 0) {
                                        first_occur = index_content;
                                    }
                                }
                            });
                        }
                        // show search results
                        if (isMatch) {
                            str += "<li><a href='" + data_url + "' class='search-result-title'>" + data_title + "</a>";
                            var content = data.content.trim().replace(/<[^>]+>/g, "");
                            if (first_occur >= 0) {
                                // cut out 100 characters
                                var start = first_occur - 20;
                                var end = first_occur + 80;
                                if (start < 0) {
                                    start = 0;
                                }
                                if (start === 0) {
                                    end = 100;
                                }
                                if (end > content.length) {
                                    end = content.length;
                                }
                                var match_content = content.substr(start, end);
                                // highlight all keywords
                                keywords.forEach(function (keyword) {
                                    var regS = new RegExp(keyword, "gi");
                                    match_content = match_content.replace(regS, "<em class=\"search-keyword\">" + keyword + "</em>");
                                });

                                str += "<p class=\"search-result\">" + match_content + "...</p>"
                            }
                            str += "</li>";
                        }
                    });
                    str += "</ul>";
                    $resultContent.innerHTML = str;
                });
            }
        });
    };

    searchFunc('/search.xml', 'searchInput', 'searchResult');
});
</script>

    <!-- 回到顶部按钮 -->
<div id="backTop" class="top-scroll">
    <a class="btn-floating btn-large waves-effect waves-light" href="#!">
        <i class="fas fa-arrow-up"></i>
    </a>
</div>
<div>
<a onclick="switchNightMode()" id="sma" title="模式切换">
    <i class="fa fa-moon-o" id="nightMode" aria-hidden="true"></i>
</a>
</div>


    <script src="/libs/materialize/materialize.min.js"></script>
    <script src="/libs/masonry/masonry.pkgd.min.js"></script>
    <script src="/libs/aos/aos.js"></script>
    <script src="/libs/scrollprogress/scrollProgress.min.js"></script>
    <script src="/libs/lightGallery/js/lightgallery-all.min.js"></script>
    <script src="/js/matery.js"></script>
    <script src="/libs/mermaid/mermaid.min.js"></script>

    <!-- Baidu Analytics -->

<script>
    var _hmt = _hmt || [];
    (function () {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?b3593488200a34a873defcaa11fc888a";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>

    <!-- Baidu Push -->

<script>
    (function () {
        var bp = document.createElement('script');
        var curProtocol = window.location.protocol.split(':')[0];
        if (curProtocol === 'https') {
            bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
        } else {
            bp.src = 'http://push.zhanzhang.baidu.com/push.js';
        }
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bp, s);
    })();
</script>

    
    <script src="/libs/others/clicklove.js" async="async"></script>
    
    

    

    

    <!--腾讯兔小巢-->
    
        <div style="position:fixed;bottom:125px;right:16px;cursor: pointer;" ID="tuxiaochao">
            <a title="兔小巢" target="_blank" rel="noopener" href="https://support.qq.com/products/348756"><i class="fa fa-comments fa-3x"  aria-hidden="true"></i></a>
        </div>
    
    

    
    
    <script type="text/javascript" size="150" alpha='0.6'
        zIndex="-1" src="/libs/background/ribbon-refresh.min.js" async="async"></script>
    

    
    <script type="text/javascript" src="/libs/background/ribbon-dynamic.js" async="async"></script>
    

    
    <script src="/libs/instantpage/instantpage.js" type="module"></script>
    
	<script type="text/javascript">
//	//只在桌面版网页启用特效
	//var windowWidth = $(window).width();
	//if (windowWidth > 768) {
//		document.write('<script type="text/javascript" src="/js/sakura.js"><\/script>');
//	}
	</script>
	
	<script type="text/javascript">
		var OriginTitile=document.title,st;
		document.addEventListener("visibilitychange",function(){ document.hidden?(document.title="ヽ(●-`Д´-)ノ110，有人失踪了",clearTimeout(st)):(document.title="(Ő∀Ő3)ノ失踪人口回归！",st=setTimeout(function(){document.title=OriginTitile},3e3))
		})
	</script>


</body>

</html>
